//
//  VideoLisetCell.m
//  ijkPlayer
//
//  Created by apple on 2018/6/5.
//  Copyright © 2018年 锦. All rights reserved.
//

#import "VideoLisetCell.h"

@implementation VideoLisetCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        CGRect rect = [UIScreen mainScreen].bounds;
        _coverImgView = [[UIImageView alloc] initWithFrame:rect];
        _coverImgView.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_coverImgView];
        
        
        UIView *view = [[UIView alloc]initWithFrame:self.frame];
        view.backgroundColor = [UIColor clearColor];
        _nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, rect.size.height-100, 100, 30)];
        _nameLabel.backgroundColor = [UIColor blueColor];
        [view addSubview:_nameLabel];
        _selectedView = view;
        
        [self.contentView addSubview:view];
    }
    return self;
}
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    if (self.touchBlock) {
        self.touchBlock();
    }
}
- (void)play:(UIButton *)sender {
    if (self.playBlock) {
        self.playBlock(sender);
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
